﻿using MiData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VolunteerManager.Model
{
    /// <summary>
    /// 群
    /// </summary>
    public class Group:MiData.MiActiveRecord
    {
        private string name;
        [Column(Name = "Name")]
        public string Name
        {
            get { return this.name; }
            set
            {
                this.name = value;
                if (!this.IsNew)
                {
                    this.Save();
                    this.RaisePropertyChanged("Name");
                }
            }
        }

        /// <summary>
        /// 群组名称
        /// </summary>
        //[Column(Name = "Name")]
        //public string Name { get; set; }

        public override string TableName
        {
            get { return "VoluteerGroup"; }
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
